package com.zjt.quartz;

import org.springframework.beans.factory.annotation.Autowired;

import java.util.TimerTask;

public class EncodeQrCodeTask extends TimerTask {
    @Autowired
    private QuartzJob quartzJob;
    private static boolean isRunning = false;//避免重复调用

  @Override
  public void run() {
    if(!isRunning){
      isRunning = true;
        JobRuntime();
      isRunning = false;
    }
  }

  public void JobRuntime() {
      quartzJob.encoderQRCode();
  }

}